package com.hundun.hddeal.dao;

import com.hundun.hddeal.entity.Order;
import com.hundun.hddeal.vo.StatusCountVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

/**
 * 预约公众号大单接口
 * @author 谢
 */
@Component
public interface OrderMapper {

    int deleteByPrimaryKey(Long id);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Long id);

    int updateStatus(byte status,String hostId,Double money);

    /**查询广告用户大单*/
    List<Order> getAdOrder(@Param("adId") String adId,@Param("hostId") String hostId,
                           @Param("needName") String needName,@Param("startTime") Date startTime,
                           @Param("endTime") Date endTime,@Param("status") Byte status);

    /**查询媒体用户大单*/
    List<Order> getMtOrder(@Param("mtId") String mtId, @Param("hostId") String hostId,
                           @Param("needName") String needName, @Param("startTime") Date startTime,
                           @Param("endTime") Date endTime,@Param("status")Byte status);

    /**查询广告订单状态条数*/
    StatusCountVo getAdCount(@Param("adId") String adId);

    /**查询媒体订单状态条数*/
    StatusCountVo getMtCount(@Param("mtId") String mtId);

}